home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / network / exp16116.zip / EXP16.INC < prev    next >
Text File  |  1993-06-02  |  7KB  |  312 lines

  1. ;    82586 Structure definitions
  2.  
  3. SysConfigPtr    struc
  4. SCP_SystemBus        dw    ?
  5.             dw    2 dup (?)
  6. SCP_ISCP_Ptr_low    dw    ?
  7. SCP_ISCP_Ptr_high    dw    ?
  8. SysConfigPtr    ends
  9.  
  10.  
  11. ;----------------------------------------------------------------
  12. ; Note: The @ addresses are the I/O address offsets from [bp].
  13. ;----------------------------------------------------------------
  14.  
  15. ; The SCP is at location XXX6H.  Since the
  16. ; SMB pointers must have the low order 5 bits
  17. ; zero, we assume that the SMP pointer will
  18. ; be set to XXE0H
  19. @SysConfigPtr    struc
  20.     db    8000h dup (?)
  21.     dw    ?
  22.     dw    ?
  23.     dw    ?
  24. @SCP_SystemBus    dw    ?
  25.     dw    2 dup (?)
  26. @SCP_ISCP_Ptr_low    dw    ?
  27. @SCP_ISCP_Ptr_high    dw    ?
  28. @SysConfigPtr    ends
  29.  
  30.  
  31. ISysConfigPtr    struc
  32. ISCP_Busy    dw    ?
  33. ISCP_SCB_Offset    dw    ?
  34. ISCP_Ptr_low    dw    ?
  35. ISCP_Ptr_high    dw    ?
  36. ISysConfigPtr    ends
  37.  
  38.  
  39. ; NOTE: Access to the SCB through the shadow
  40. ; registers is done by setting the SMB_PTR to
  41. ; the ISCP base address and then using this
  42. ; structure.  This is because the SCB address
  43. ; does not start on a 32 byte boundary as
  44. ; as required for the SMB_PTR.
  45.  
  46. @ISysConfigPtr    struc
  47.     db    4000h dup (?)
  48. @ISCP_Busy    dw    ?
  49. @ISCP_SCB_Offset    dw    ?
  50. @ISCP_SCB_Ptr_low    dw    ?
  51. @ISCP_SCB_Ptr_high    dw    ?
  52. @SCB_Status    dw    ?
  53. @SCB_Command    dw    ?
  54. @SCB_CommandList    dw    ?
  55. @SCB_RecBlockList    dw    ?
  56.     db    4000h - 16 dup (?)
  57. @SCB_CRC_Errors    dw    ?
  58. @SCB_ALN_Errors    dw    ?
  59. @SCB_RSC_Errors    dw    ?
  60. @SCB_OVR_Errors    dw    ?
  61. @ISysConfigPtr    ends
  62.  
  63.  
  64. SystemControlBlock    struc
  65. SCB_Status    dw    ?
  66. SCB_Command    dw    ?
  67. SCB_CommandList    dw    ?
  68. SCB_RecBlockList    dw    ?
  69. SCB_CRC_Errors    dw    ?
  70. SCB_ALN_Errors    dw    ?
  71. SCB_RSC_Errors    dw    ?
  72. SCB_OVR_Errors    dw    ?
  73. SystemControlBlock    ends
  74.  
  75. ; NOTE: The SCB shadow register structure is
  76. ; part of the ISysConfigPtr shadow register
  77. ; structure.
  78.  
  79. ReceiveBlock    struc
  80. FD_Status    dw    ?
  81. FD_Command    dw    ?
  82. FD_Link        dw    ?
  83. FD_RBD_Offset    dw    ?
  84. RBD_ByteCount    dw    ?
  85. RBD_Link    dw    ?
  86. RBD_RB_Address_low    dw    ?
  87. RBD_RB_Address_high    dw    ?
  88. RBD_Size    dw    ?
  89. RB_Data        db    RxBufferSize dup (?)
  90. ReceiveBlock    ends
  91.  
  92. ReceiveBlock_data    struc
  93. IPX_FD_Status    dw    ?
  94. IPX_FD_Command    dw    ?
  95. IPX_FD_Link    dw    ?
  96. IPX_FD_RBD_Offset    dw    ?
  97. IPX_RBD_ByteCount    dw    ?
  98. IPX_RBD_Link    dw    ?
  99. IPX_RBD_RB_Address_low    dw    ?
  100. IPX_RBD_RB_Address_high    dw    ?
  101. IPX_RBD_Size    dw    ?
  102. IPX_DestAddr_HIGH    dw    ?
  103. IPX_DestAddr_MID    dw    ?
  104. IPX_DestAddr_LOW    dw    ?
  105. IPX_SourceAddr_HIGH    dw    ?
  106. IPX_SourceAddr_MID    dw    ?
  107. IPX_SourceAddr_LOW    dw    ?
  108. IPX_LengthTypeField    dw    ?
  109. ReceiveBlock_data    ends
  110.  
  111.  
  112. @ReceiveBlock    struc
  113.     db    4000h dup (?)
  114. @FD_Status    dw    ?
  115. @FD_Command    dw    ?
  116. @FD_Link    dw    ?
  117. @FD_RBD_Offset    dw    ?
  118. @RBD_ByteCount    dw    ?
  119. @RBD_Link    dw    ?
  120. @RBD_RB_Address_low    dw    ?
  121. @RBD_RB_Address_high    dw    ?
  122.     db    4000h - 16 dup (?)
  123. @RBD_Size    dw    ?
  124. ; Ethernet Packet Data
  125. @DestAddr_HIGH    dw    ?
  126. @DestAddr_MID    dw    ?
  127. @DestAddr_LOW    dw    ?
  128. @SourceAddr_HIGH    dw    ?
  129. @SourceAddr_MID    dw    ?
  130. @SourceAddr_LOW    dw    ?
  131. @LengthTypeField    dw    ?
  132. @ReceiveBlock    ends
  133.  
  134. SendBlock    struc
  135. TxCB_Status    dw    ?
  136. TxCB_Command    dw    ?
  137. TxCB_Link    dw    ?
  138. TxCB_TBD_Offset    dw    ?
  139. TBD_ByteCount    dw    ?
  140. TBD_Link    dw    ?
  141. TBD_TB_Address_low    dw    ?
  142. TBD_TB_Address_high    dw    ?
  143. TB_Data        db    TxBufferSize dup (?)
  144. SendBlock    ends
  145.  
  146.  
  147. @SendBlock    struc
  148.     db    4000h dup (?)
  149. @TxCB_Status    dw    ?
  150. @TxCB_Command    dw    ?
  151. @TxCB_Link    dw    ?
  152. @TxCB_TBD_Offset    dw    ?
  153. @TBD_ByteCount    dw    ?
  154. @TBD_Link    dw    ?
  155. @TBD_TB_Address_low    dw    ?
  156. @TBD_TB_Address_high    dw    ?
  157.     db    4000h - 16 dup (?)
  158. @TB_Data    db    TxBufferSize dup (?)
  159. @SendBlock    ends
  160.  
  161.  
  162. CommandBlock    struc                     ;Set command block
  163. CB_Status    dw    ?            ; Size for largest
  164. CB_Command    dw    ?            ; command.  The Dump
  165. CB_Link        dw    ?                ; command needs a 170
  166. CB_Param0    dw    ?            ; byte area.  The 14
  167.     db    170+14 dup (?)         ; extra bytes are
  168. CommandBlock    ends                    ; padding to make the
  169.                             ; size of this struc
  170.                             ; boundary.
  171. @CommandBlock    struc
  172.     db    4000h dup (?)        ;Set command block
  173. @CB_Status    dw    ?            ; Size for largest
  174. @CB_Command    dw    ?            ; command.  The Dump
  175. @CB_Link    dw    ?            ; command needs a 170
  176. @CB_Parm0    dw    ?            ; byte area.  The 14
  177.     db    170+14 dup (?)      ; extra bytes are
  178. @CommandBlock    ends                    ; padding to make the
  179.                             ; size of this struc
  180.                             ; align on a 16 byte
  181. SCPS        equ    SysConfigPtr
  182. ISCPS        equ    ISysConfigPtr
  183. SCBS        equ    SystemControlBlock
  184.  
  185. ; System ControlBlock.
  186.  
  187. Bit_CX        equ    8000h
  188. Bit_FR        equ    4000h
  189. Bit_CNA        equ    2000h
  190. Bit_RNR        equ    1000h
  191.  
  192. ;  System Control Block's control unit statuses
  193.  
  194. CUS_Idle    equ    0000h
  195. CUS_Suspended    equ    0100h
  196. CUS_Active    equ    0200h
  197. CUS_Mask    equ    0300h
  198.  
  199. ;  System Control Block's receive unit statuses.
  200. RUS_Idle    equ    0000h
  201. RUS_Suspend    equ    0010h
  202. RUS_No_Resource    equ    0020h
  203. RUS_Ready    equ    0040h
  204.  
  205. ;  System Control Block's control unit commands
  206. CUC_NOP        equ    0000h
  207. CUC_Start    equ    0100h
  208. CUC_Resume    equ    0200h
  209. CUC_Suspend    equ    0300h
  210. CUC_Abort    equ    0400h
  211.  
  212. ;  System Control Block's receive unit commands
  213. RUC_NOP        equ    0000h
  214. RUC_Start    equ    0010h
  215. RUC_Resume    equ    0020h
  216. RUC_Suspend    equ    0030h
  217. RUC_Abort    equ    0040h
  218.  
  219.  
  220. ; General Action Command Block.
  221.  
  222. GA_NOP        equ    0000h
  223. GA_IA_Setup    equ    0001h
  224. GA_Configure    equ    0002h
  225. GA_MC_Setup    equ    0003h
  226. GA_Transmit    equ    0004h
  227. GA_TDR        equ    0005h
  228. GA_Dump        equ    0006h
  229. GA_Diagnose    equ    0007h
  230.  
  231.     lock_bit_address    EQU    01H
  232.     lock_bit_mask    EQU    0000000000000001B
  233.     iochrdy_mask    EQU    00010000B
  234.     iochrdy_test_mask    EQU    00100000B
  235.     iochrdy_test_result    EQU    01000000B
  236.     iochrdy_early    EQU    00000000B
  237.     iochrdy_late    EQU    00010000B
  238.  
  239.  
  240. ; Common Bits.
  241.  
  242. Bit_C        equ    8000h    ; Command complete.
  243. Bit_B        equ    4000h    ; Busy executing command.
  244. Bit_OK        equ    2000h    ; Error free completion.
  245. Bit_A        equ    1000h    ; Command aborted.
  246.  
  247. Bit_EL        equ    8000h    ; End of list.
  248. Bit_EOF        equ    8000h    ; End of frame.
  249. byte_Bit_EOF    equ    80h    ; End of frame.
  250. Bit_S        equ    4000h    ; Suspend after completion.
  251. Bit_I        equ    2000h    ; Interrupt after completion.
  252.  
  253. Bit_S11        equ    0800h
  254. Bit_S10        equ    0400h
  255. Bit_S9        equ    0200h
  256. Bit_S8        equ    0100h
  257. Bit_S7        equ    0080h
  258. Bit_S6        equ    0040h
  259. Bit_S5        equ    0020h
  260.  
  261. ACK_INT_Mask    equ    0f000h
  262. MaxCollisions    equ    0020h
  263. Ready        equ    0040h
  264.  
  265. LNK_OK        equ    8000h
  266. XCVR_PRB    equ    4000h
  267. ET_OPN        equ    2000h
  268. ET_SRT        equ    1000h
  269. TDR_TIME    equ    07ffh
  270.  
  271. ;
  272. ; equates and definitions:
  273. ;
  274. EOI        equ    020h    ;End-of-interrupt command.
  275. Master_PIC    equ    020h    ;1st Interrupt-Control port.
  276. Slave_PIC    equ    0A0h    ;2nd Interrupt-Control port.
  277.  
  278. Number_of_Tx_Buffers    equ    1
  279.  
  280. _586_Reset    equ    0080H
  281. ASIC_Reset    equ    0040H
  282.  
  283. bus_width    equ    0    ;16 bit, use for initialize
  284. initialize_586    equ    1
  285.  
  286. ;
  287. ; Timer equates
  288. ;
  289.     one_mil    EQU    02387
  290.     ten_mils    EQU    23866
  291.  
  292.  
  293. ;
  294. ;  EEPROM equATES
  295. ;
  296. EE_SK        equ    00000001B    ;EEPROM shift clock (1 = high, 0 = low)
  297. EE_CS        equ    00000010B    ;EEPROM chip select (1 = high, 0 = low)
  298. EE_DI        equ    00000100B    ;EEPROM data in (set to 1 for writing data to EEPROM)
  299. EE_DO        equ    00001000B    ;EEPROM data out
  300. EE_tick        equ    10
  301.  
  302. EEPROM_read_opcode    equ    110B
  303. EEPROM_write_opcode    equ    101B
  304. EEPROM_erase_opcode    equ    111B
  305. EEPROM_EWEN_opcode    equ    10011B        ;Erase/write enable
  306. EEPROM_EWDS_opcode    equ    10000B        ;Erase/write disable
  307.  
  308. TIME_OUT_VALUE    equ    0FFFFh
  309.  
  310. loopback_enable    equ    00000010B
  311.  
  312.